<?php

declare(strict_types=1);

namespace app\shop\controller\admin\data;

use sheep\controller\Backend;
use app\Request;
use app\shop\model\data\Express as ExpressModel;
use sheep\controller\traits\Crud;
use think\facade\Db;
use think\Response;

class Express extends Backend
{
    use Crud;

    protected $model = null;
    protected $isPaginate = true;
    protected $onlyParams = ['name', 'code', 'weigh'];

    public function initialize()
    {
        $this->model = new ExpressModel();
    }


    public function select(Request $request): Response
    {
        $list = $this->model->sheepFilter()->paginate($request->param('list_rows', 10));

        return success('获取成功', $list);
    }
}
